NOTE: This is a text-only version of the tutorial. To view the accompanying screengrabs, please refer to the .doc version (Microsoft Word format) on the CD
This tutorial explains the process of using motion-capture data to drive a character's animation within LightWave. To do so, weΓll be rigging the models in LightWave, importing them into FiLMBOX, KaydaraΓs real-time character animation package, applying mo-cap data (you can find five sample files on this cover CD), then transferring the completed animation back into LightWave.
WeΓll be assuming that you already have some basic knowledge of LightWave 7.5, and know how to set up skelegons in Modeler or Bones in Layout. Since version 4.0, FiLMBOX has been known as MOTIONBUILDER, but youΓll find that the walkthrough also works in the newer versions of the software. (A full copy of MOTIONBUILDER 4.0 PE was included on the CD with issue 41 of 3D World.)
For the purposes of the tutorial, weΓll be using low-polygon segmented models, so as to make it easier to explain the basic procedures. The same techniques can also be applied to non-segmented and high-polygon models. The characters we will be using are Odessa, modeled and textured by Joe Gardner, and Cybot, modeled and textured by Vincent Tang.
A. Preparing your character in LightWave
1. Basic setup
Preparing your model correctly before exporting it to FiLMBOX can save a lot of headaches later in the project. It is important to have you character in the T-Pose and facing down the -Z axis, otherwise you risk unexpected errors later. If you decide to use a high-polygon model, make sure you freeze your character.
2. Bones
When you finished creating a model, just set up skelegons as you normally would. You can either create them in Modeler or Layout - in this case, we chose Modeler. Here, you can see two possible setups that we used and found to work with our characters. No single set up will necessarily work for every character you create.
As you can see, there are extra Skelegons for Cybot. Although both set-ups work in the same way in FiLMBOX, these extra Skelegons give a little more control over the end results. It is important that there is a bone called ROOT. In the 23 and 16 Skelegon setup, it is important that the ROOT bone is the parent of all other existing Skelegons. Be sure to label the Skelegons so that they can be easily identified after export to FiLMBOX. These are the names we used:
3. Weight maps
Even though you can create weight maps in FiLMBOX, it is the weight maps in LightWave that we are most concerned with here. These are slightly different for our two characters.
Because Odessa is segmented and has a 16-Skelegon setup, we decided to set the weight maps at 100% influence for each section of the model assigned to a bone, with absolutely no vertices sharing a bone.
For Cybot, the weight map setup is similar, except that there is some sharing of weight maps. The sharing occurs at some of the major joints of the character - elbows and knees. CybotΓs segments at the elbows and knees were unnecessary because the knees caused the model to tear so the knee was assigned to the thighΓs weight map.
As you create the weight maps, you have to name them. These names need to correspond to the Skelegon names that they will be assigned to. Once they are all created, open the Skelegon Tree and assign the weight maps to the correct Skelegon.
Be sure to save as you go along! Note: if you want to have morph targets on your character, you need to set those up as well before taking it over into FiLMBOX.
4. Layout
Send your character to Layout and convert your Skelegons to bones. In the Schematic view, make sure to check your bone hierarchy and make any necessary changes.
If you do need to make a change, be sure to keep an eye on the bones and the character to make sure that you donΓt have any unwanted movement. ItΓs also a good idea to go to the Property Inspector and check each bone to make sure that the weight maps are assigned correctly. Double-checking at this stage will save a lot of time and work later.
Now, save two scene files for each character. Yes, two. The first will be the original. If anything goes wrong, refer back to this one. The second will be the one that we use while in FiLMBOX.
B. Importing the characters into FiLMBOX
This part of the tutorial assumes that you have some knowledge of FiLMBOX and motion-capture data. DonΓt forget: if you donΓt have FiLMBOX, these same procedures can be applied in MOTIONBUILDER. WeΓll be working with five motions we captured at the University of GeorgiaΓs motion-capture studio, in ViconΓs .c3d format (you can find these on the CD). Although the space we had to work with was only 8ft in diameter, we were happy with the information we were able to record.
At this point, you need to set up the character in FiLMBOX that you will map your LightWave character to. With the Actor tab selected, position the actor (the FiLMBOX model) to the motion file of the T-pose you have imported. Selecting the root will translate, scale, and rotate the entire actor when trying to position it to the T-pose. Select other parts of the actor to individually transform them.
After fitting the actor to the T-pose, continue with marker setup. Once you finish the marker setup, import the scene/motion file as you did with the T-pose.
Creating rigid bodies will help keep your character in one piece. This is especially good if you have segmented characters. It prevents the limbs or other parts of the body from floating around the scene. Snap all when finished.
After opening and setting up the second actor and character, you may also want to create rigid bodies for it. When you do, the second T-pose will be overlapping the first T-pose, so be careful not to select markers from the first T-pose (zoom in if you find it difficult to tell which pose the markers belong to).
Before you import your character, select the Character button located on the left-side column. Click Create and enter the name of your motion-capture performer.
Now letΓs import the LightWave character. Go to File/Scenes/Import/LightWave 6.X LWS. Open the T-Pose of your character. This is the same file that we made a copy of in LightWave, and it is here that we will utilize it. If youΓre working on a two-character scene, open the T-pose for your first character.
Next, click in the viewing window and press [Ctrl] + [W] to switch to schematic view. Hold [Shift] + [Left Mouse Button] and move across the screen to find the bone structure of your model.
Once you find it, click Define below the viewing window and then begin double clicking the labels of the bones in the window and [Alt]-dragging them into the list under the Define tab. If you have a bone structure with extra shoulder and pelvis bones, do not list them, because they can cause the model to become deformed when it is exported back to LightWave.
If you make a mistake during labeling, just double-click on the name under the Model list, delete the name from it and hit [Enter]. After you have labeled all the bones, switch back to the regular viewing mode ([Ctrl] + [W]) and click Characterize.
Now click the General tab beside the Define tab. For Type, select Actor Input, and for Source, select the performerΓs name. Click Active and your character should now snap to the performerΓs position.
Now letΓs watch your character in motion. Select Models option under the Viewing Attributes in the view list on the right column. Play the scene. (You can find scene files on the cover CD.)
If everything moves okay, then save your file. This will be an .fbx file.
Note: If you get deformation on your character in FiLMBOX, remember that the FiLMBOX weights are not the same as the LightWave weights. A good thing to do would be to wait before you stress and export your character back to LightWave. If things are not quite right in LightWave, you may have to go back and start back at the point where you bring in your model into FiLMBOX, checking you weight maps in LightWave again before you do so.
For a two-model scene, save the scene under a different name and then repeat the import process and all the procedures thereafter the second model.
Now letΓs get ready to go back to LightWave. But before exporting the file, there are a couple of things you need to do. Return to the Schematic view and select only the bone labels. They should be green when highlighted.
Select the Animation button and click Plot Current and hit OK. Also hit Plot all, just for safetyΓs sake.
Go to File/Scenes/Export/LightWave 6.X LSW and choose the duplicate LightWave scene that you made. Hit OK and it will overwrite that file.
Note: For the two-character scene, you should plot the animation to the characters one at a time. Choose the first characterΓs bone labels, plot the animations and export, saving over the first LightWave file. Then choose the second character and repeat, this time saving over the second LightWave scene.
3. Transferring the scene back into LightWave
Back to LightWave. Open the LightWave scene that you just saved over and your character should come in at the start position of the motion that you applied in FiLMBOX. Play the animation and watch your character move.
For the two-character scene, open the first characterΓs scene and play the animation to make sure that everything is fine. Now go to File/Load/Load Items from Scene and choose the second characterΓs file. You should now have a LightWave scene with both characters in it.
Save your scene under a new name. You sure donΓt want to save over the wrong file. Also, never delete any of your files that contain the original data. You never know when you might need it. Congratulations! You have now imported motion-capture data into LightWave.
But what happens if you need to make any changes? Well, letΓs take a look. If you go to the Graph Editor, you will notice that there are key frames on every frame for every bone. DonΓt be alarmed - we will make this more manageable. LightWave, FiLMBOX, and MOTIONBUILDER all have motion-filtering function. By using a filter, we can get cleaner motion files, reducing the number of key frames and motion tweaks - for this example, we choose to filter in LightWave. You still have the same control on every bone as you would normally have, so donΓt be afraid to make changes.
If you click on your characterΓs name, all of its channels will appear. Holding down the right mouse button, select them from the start keyframe to the end keyframe by drawing a marquee around them. They will now all be highlighted. You may have to wait a couple of minutes to do this depending on your system because of the large volume of data.
Now go to the Keys dropdown, and choose Set Key Reduction Threshold. A small popup window will appear, asking you ╬by what percentage would you like to reduce the keys?Γ It is important to note that the more you reduce your keys, the more motion data you are getting rid of; get rid of too much, and your character will begin to float. We recommend that you save your scene under a new name after every key reduction so that you can refer back to a previous file. Just be sure to check your motions every time you do a reduction. We initially started out with a 50% reduction and kept repeating the process until we were happy that our motions were smooth, not floating, and that the number of keys we were left to play with was manageable.
To see the end results, check out the AVI file on the CD. We hope that this process has helped with your motion-capture projects. There is a lot of free motion-capture data out there on the Internet, so keep experimenting, and have some fun!
Thanks to Joe Gardner (LightWave) and Maki Fukumoto (Vicon) for their help, and to our motion capture actors; Kenny Kilfara, David Limbach, and Clif Ruch.